package com.samphanie.auiu.app.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.samphanie.auiu.mbg.model.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @author ZSY
 * @email 1451691457@qq.com
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_role")
@EqualsAndHashCode(callSuper = true)
public class Role extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -2800998477100106081L;

    private String roleName;
    /**
     * 角色展示名称
     */
    private String displayName;

    /**
     * 描述
     */
    private String description;

    /**
     * 后台用户数量
     */
    private Integer adminCount;

    /**
     * 启用状态：0->禁用；1->启用
     */
    private boolean status;

    /**
     * 内置账户：0->否；1->是
     */
    private boolean builtIn;

    /**
     * 排序
     */
    private Integer sort;

    @Builder.Default
    @TableField(exist = false)
    private Set<Permissions> permissions = new HashSet<>();
}
